
window.setMaxDigits(131);
const key = new window.RSAKeyPair("10001", "", "9b82663dd07cd4bb68f5b2d249db6216fcf3c9156d28" +
  "481531cf8cb56dd323147ad0880afa43c354410bac99782aa6da18e69fd17d" +
  "7574ac83dcc67c07564d4a6f124f62ce966761d2bac213197690bdb18530a6" +
  "1fd9815d7590baa57caddda59ffbe5178d0f6191fb07e92c7684e1869fce21" +
  "c67bae184a58271a30fecd3119")
const str = 'wlcbPortal';
export const aeslogin = function (username, password) {
  const userName = window.encryptedString(key, encodeURIComponent(username));
  const passWord = window.encryptedString(key, window.md5(password).toUpperCase());
  const key1 = window.faultylabs.MD5(username + window.md5(password).toUpperCase() + str)
  return {
    userName,
    passWord,
    key1
  }
}
export const aespassword = function (id, username, oldpassword, newpassword) {
  return {
    id: id,
    userName: window.encryptedString(key, encodeURIComponent(username)),
    oldPassWord: window.encryptedString(key, window.md5(oldpassword).toUpperCase()),
    newPassWord: window.encryptedString(key, window.md5(newpassword).toUpperCase()),
    key1: window.faultylabs.MD5(id + username + window.md5(oldpassword).toUpperCase() + window.md5(newpassword).toUpperCase() + str)
  }
}